// LuoSnapShot.h
// 2008/11/26

#pragma once

#ifndef STDCALL
#define STDCALL __stdcall
#endif

/* */

#ifdef LUOSNAPSHOT_EXPORTS
#define LUOSNAPSHOT_FUNC __declspec(dllexport)
#else
#define LUOSNAPSHOT_FUNC __declspec(dllimport)
#endif

/* */

extern "C"
HRESULT LUOSNAPSHOT_FUNC STDCALL LuoSnapShot_Activate(
	LPCWSTR token,
	void**  obj);

/* */

namespace LuoSnapShot {

	const UINT WM_LUO_SNAPSHOT_CALLBACK = RegisterWindowMessageW(L"WM_LUO_SNAPSHOT_CALLBACK");
/* */

// WebItem
struct WebItem {

	LPCWSTR Uri;		// 
	LPCWSTR Path;		// 

	int ImageWidth;		// 
	int ImageHeight;	// 

	HWND Target;		// 
	UINT Message;		// 
	INT_PTR Cookie;		// 

	DWORD ShotDelay;		// 
	DWORD NavigateTimeout;	// 

	int PageWidth;		// 
	int PageHeight;		// 
	bool Show;			// 

	WebItem()
	{
		Uri  = 0;
		Path = 0;

		ImageWidth  = 1024;
		ImageHeight =  768;

		Target  = 0;
		Message = 0;

		Cookie = 0;

		PageWidth  = 640;
		PageHeight = 480;

		ShotDelay       =  1000;
		NavigateTimeout = 1000 * 10;

		Show = false;
	}

}; // WebItem

/* */

// ClipDump
struct ClipDump {

	LPCWSTR BaseName;	// L"clipdump.txt" or L"clipdump.jpg")
	LPCWSTR BasePath;	// L"c:")

	LPCWSTR MimeType;	// (L"image/jpg", L"image/bmp", L"image/png", "image/gif"...)

	ClipDump()
	{
		BaseName = 0;
		BasePath = 0;

		MimeType = 0;
	}

}; // ClipDump

/* */

// UActivator
class UActivator {

public:

	virtual HRESULT STDCALL Initialize() = 0;

	virtual void STDCALL Uninitialize() = 0;

	virtual HRESULT STDCALL AddWebItem(
		const WebItem* item) = 0;

	virtual HRESULT STDCALL DumpClipboard(
		const ClipDump* item) = 0;

}; // UActivator

/* */

} // namespace LuoSnapShot

/* */

